/**
 * 
 */
package org.ccay.async.task.service;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.ccay.async.task.ExportTaskVO;
import org.ccay.core.base.PageVO;
import org.ccay.core.base.PagedResult;
import org.ccay.core.exception.ApplicationException;

/**
 * task service which used by task status mng
 * 
 * @author chaowangbang
 * 
 */
@Path("/export")
@Produces("application/json")
public interface IExportTaskService {

	/**
	 * 删除（多条）任务
	 * 
	 * @author chaowangbang
	 * @since 2011-12-6
	 * @param exportTaskVOs
	 * @throws ApplicationException
	 */
	@PUT
	@Path("/d/list")
	public void deleteExportTaskList(List<ExportTaskVO> exportTaskVOs) throws ApplicationException;

	/**
	 * 删除（单条）任务
	 * 
	 * @author chaowangbang
	 * @since 2011-12-6
	 * @param exportTaskVO
	 * @throws ApplicationException
	 */
	public void deleteExportTask(ExportTaskVO exportTaskVO) throws ApplicationException;

	/**
	 * 生成任务
	 * 
	 * @author chaowangbang
	 * @since 2011-12-6
	 * @param exportTaskVO
	 * @throws ApplicationException
	 */
	public void createExportTask(ExportTaskVO exportTaskVO) throws ApplicationException;

	/**
	 * 根据ID获取导出任务信息
	 * 
	 * @author chaowangbang
	 * @since 2011-12-6
	 * @param id
	 * @return
	 * @throws ApplicationException
	 */
	public ExportTaskVO findExportTaskById(int id) throws ApplicationException;

	
	/**
	 * 返回任务类型用于下拉框
	 * 
	 * @author chaowangbang
	 * @since 2012-1-16
	 * @return
	 */
	@GET
	@Path("/list")
	public List<ExportTaskVO> findModuleNameDistinct();

	/**
	 * 返回任务类型用于下拉框
	 * 
	 * @author chaowangbang
	 * @since 2012-1-16
	 * @return
	 */
	@GET
	@Path("/monitor/list")
	public List<ExportTaskVO> findMonitorModuleNameDistinct();

	/**
	 * 分页查找
	 * 
	 * @author chaowangbang
	 * @since 2012-2-13
	 * @param exportTaskVOs
	 * @param pageVO
	 * @return
	 */
	@GET
	@Path("list/page/{pageSize}/{curPage}")
	public PagedResult<ExportTaskVO> findExportTaskList(@QueryParam("") ExportTaskVO exportTaskVOs,
			@PathParam("") PageVO pageVO) throws ApplicationException;

	/**
	 * 过滤模式
	 * 
	 * @author chaowangbang
	 * @since 2013-9-24
	 * @param exportTaskVOs
	 * @param pageVO
	 * @return
	 * @throws ApplicationException
	 */
	@GET
	@Path("list/page/{pageSize}/{curPage}/{filterStr}")
	public PagedResult<ExportTaskVO> findExportTaskListFilter(@QueryParam("") ExportTaskVO exportTaskVOs,
			@PathParam("") PageVO pageVO) throws ApplicationException;

	/**
	 * 分页查找，用于导出监控
	 * 
	 * @author chaowangbang
	 * @since 2013-7-22
	 * @param exportTaskVOs
	 * @param pageVO
	 * @return
	 * @throws ApplicationException
	 */
	@GET
	@Path("list/page/monitor/{pageSize}/{curPage}")
	public PagedResult<ExportTaskVO> findExportTaskListMonitor(@QueryParam("") ExportTaskVO exportTaskVOs,
			@PathParam("") PageVO pageVO) throws ApplicationException;

	/**
	 * 更新导出任务状态和其他信息
	 * 
	 * @author chaowangbang
	 * @since 2012-05-28
	 * @param exportTaskVOs
	 */
	public void updateExportTask(ExportTaskVO exportTaskVO) throws ApplicationException;

}